@extends('layout.layout')
@section('content')
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">用户修改</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!--用户添加表单 -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                           用户修改^_^
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6 col-lg-offset-3">
                                <!-- 验证报错 -->
                                @if (count($errors) > 0)
                                    <div class="alert alert-danger">
                                        <ul>
                                            @foreach ($errors->all() as $error)
                                                <li>{{ $error }}</li>
                                            @endforeach
                                        </ul>
                                    </div>
                                @endif
                                    <form role="form" action="{{url('/admin/user/update')}}" method="post">
                                        <div class="form-group">
                                            <label>用户名</label>
                                            <input class="form-control" type="text" name="username" value="{{$user->username}}">
                                        </div>
                                        <div class="form-group">
                                            <label>邮箱</label>
                                            <input class="form-control" type="text" name="email" value="{{$user->email}}">
                                        </div>
                                        <input type="hidden" name="id" value="{{$user->id}}">
                                        {{csrf_field()}}
                                        <button type="submit" class="btn btn-success">修改</button>
                                        <button type="reset" class="btn btn-warning">重置</button>
                                    </form>
                                </div>
                                <!-- /.col-lg-6 (nested) -->
                                </div>
                                <!-- /.col-lg-6 (nested) -->
                            </div>
                            <!-- /.row (nested) -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
        </div>
@endsection